import Vue from 'vue'
import App from './App'
import uView from "uview-ui";
import http from "./apis/http.js"
import apis from './apis/index.js'
import store from './store/index.js'
import { imgUrl } from './filters/https_img.js'
import { sliceStr, noNull, onBreak, toast, dTime, wipeOutn, copy, callPhone, getComponent, logs } from './common/func.js'
import searchDate from "./common/dateFunction.js"
import empower from './components/empower/empower.vue'
import kong from './components/kong.vue'
import LoadBox from '@/components/our-loading/our-loading.vue'
//#ifdef H5
import loadBox from '@/components/our-loading/loadBox.js'
//#endif

//接口
Vue.prototype.$apis = apis;
//请求
Vue.prototype.$http = http;

//-----------------------------------------------------工具函数-----------------------------------------------------------

//标题长度处理
Vue.prototype.sliceStr == sliceStr
//返回上级
Vue.prototype.$onBreak = onBreak
//提示
Vue.prototype.$toast = toast
//是否不为空
Vue.prototype.$noNull = noNull
//去空
Vue.prototype.$wipeOutn = wipeOutn
//与当前时间计算
Vue.prototype.dTime = dTime
//路径拼接cfg.resourceServer.qiniu
Vue.prototype.$qimg = imgUrl
//时间方法集
Vue.prototype.$searchDate = searchDate
//转换时间 ‘s’ ‘ms’
Vue.prototype.$time13 = searchDate.time13
//深拷贝
Vue.prototype.$copy = copy
//拨打电话
Vue.prototype.$callPhone = callPhone
//自定义log
Vue.prototype.$logs = logs
//查询组件
Vue.prototype.$getComponent = getComponent


//过滤器
Vue.filter('qimg', imgUrl)
Vue.filter('sliceStr', sliceStr)

//-------------------------------------------------------组件-----------------------------------------------------------

//小程序授权组件
Vue.component('empower', empower)
//无内容
Vue.component('kong', kong)
//全屏loading
Vue.component('LoadBox', LoadBox)
//#ifdef H5
//全屏loading
Vue.use(loadBox)
//#endif
Vue.use(uView);

Vue.config.productionTip = false
uni.$u.config.unit = 'rpx'
App.mpType = 'app'

const app = new Vue({
	...App,
	store
})
app.$mount()
